package gameUi.panel
{
	import flash.events.MouseEvent;

	public class IsumAllPanel extends IsumAllPanelMC
	{
		/**
		 * 第一次询问是否买保险框
		 **/
		public function IsumAllPanel()
		{
			cmdYes.addEventListener(MouseEvent.CLICK,clickCmdYes);
			cmdNo.addEventListener(MouseEvent.CLICK,clickCmdNo);
			cmdAllYes.addEventListener(MouseEvent.CLICK,clickCmdAllYes);
			cmdAllNo.addEventListener(MouseEvent.CLICK,clickCmdAllNo);
			cmdNoTip.addEventListener(MouseEvent.CLICK,clickCmdNoTip);
		}
		
		//点击是
		private function clickCmdYes(e:MouseEvent):void{
			BlackJack._gameUi.tipOfIsumAllPanel = false;
			BlackJack._gameUi.bayIsume();
			BlackJack._gameUi.closeIsumAllPanel();
//			BlackJack._gameUi.checkCanPack();
		}
		
		//点击否
		private function clickCmdNo(e:MouseEvent):void{
			BlackJack._gameUi.tipOfIsumAllPanel = false;
			BlackJack._gameUi.notBayIsume();
			BlackJack._gameUi.closeIsumAllPanel();
//			BlackJack._gameUi.checkCanPack();
		}
		
		//点击全部是
		private function clickCmdAllYes(e:MouseEvent):void{
			BlackJack._gameUi.tipOfIsumAllPanel = false;
			BlackJack._gameUi.allBuyIsum = 1;
			BlackJack._gameUi.bayAllIsume();
			BlackJack._gameUi.closeIsumAllPanel();
//			BlackJack._gameUi.checkCanPack();
		}
		
		//点击全部否
		private function clickCmdAllNo(e:MouseEvent):void{
			BlackJack._gameUi.tipOfIsumAllPanel = false;
			BlackJack._gameUi.allBuyIsum = 2;
			BlackJack._gameUi.allNotBayIsume();
			BlackJack._gameUi.closeIsumAllPanel();
//			BlackJack._gameUi.checkCanPack();
		}
		
		//点击从不提示
		private function clickCmdNoTip(e:MouseEvent):void{
			BlackJack._gameUi.tipOfIsumAllPanel = false;
			BlackJack._gameUi.tipOfIsumPanel = false;
			BlackJack._gameUi.allNotBayIsume();
			BlackJack._gameUi.closeIsumAllPanel();
//			BlackJack._gameUi.checkCanPack();
		}
	}
}